import Vue from 'vue'
import Router from 'vue-router'
import Vuex from 'vuex'
import App from '@/App'
import Add from '@/components/Add'
import Read from '@/components/Read'
import Edit from '@/components/Edit'
import Issue from '@/components/Issue'
import Test from '@/components/Test'
import Object from '@/components/Object'
import Gist from '@/components/List/Gist'
import Gists from '@/components/List/Gists'
import List from '@/components/List/List'
import AddGist from '@/components/List/AddGist'
import Prism from 'prismjs'
import 'prismjs/themes/prism.css'

Vue.use(Prism)
Vue.use(Router);
Vue.use(Vuex);



export default new Router({
  // mode: 'history',
  routes: [
    { path: '/gists',
      name: 'Gists',
      component: Gists,
      children:[
        {
          path: 'gist',
          name: 'Gist',
          component: Gist
        },
        {
          path:"addGist",
          name:"AddGist",
          component:AddGist
        }
      ]
    },
    { path: '/list',
      name: 'List',
      component: List
    },
    { path: '/object',
      name: 'Object',
      component: Object
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    },
    {  path: '/issue',
      name: 'Issue',
      component: Issue
    },
    {
      path: '/read',
      name: 'Read',
      component: Read,
    },
    {
      path: '/edit',
      name: 'Edit',
      component: Edit
    },
    {
      path: '/add',
      name: 'Add',
      component: Add
    }
  ]
})
